<?php

$env = env::getInstance();



$env->setAttribute('psp', $filename);
$af = new phpinchains_ActionForm();
$af->set('data', $data);
$af->set('elements', $elements);
$af->set('element', $elements[$count]);
if (count($elements) > $count + 1)
    $af->set('nextElement', $elements[$count+1]);
if ($count > 0)
    $af->set('prevElement', $elements[$count-1]);
$af->set('is_last', $is_last);
$af->set('is_not_last', $is_not_last);
$af->set('is_first', $is_first);
$af->set('is_not_first', $is_not_first);
$af->set('count', $count);
$af->set('env', $env_data);
$af->set('is_editor', $GLOBALS['is_Editor']);
$af->set('is_live', $GLOBALS['is_live']);
$af->set('is_even', !($count%2));
$af->set('is_odd', ($count%2));

$env->setAttribute('outputtypeActionform', $af);

if (!defined("MODEL2_INCLUDE_PATH"))
	define("MODEL2_INCLUDE_PATH", substr($GLOBALS['cfgPaths']['lib'], 0, strlen($GLOBALS['cfgPaths']['lib'])-1));
if (!defined("MODEL2_DOJO_URL"))
	define("MODEL2_DOJO_URL", $GLOBALS['cfgPaths']['imgresUrl']."dojo/");
if (!defined("MODEL2_JSEXTRAS_URL"))
	define("MODEL2_JSEXTRAS_URL", $GLOBALS['cfgPaths']['imgresUrl']);
include_once($GLOBALS['cfgPaths']['lib'].'phpinchains/core.php');
PHPinChains::prepareAndStartChain($GLOBALS['cfgPaths']['lib']."cms/type/pspoutputtype/app.xml");

?>